using Engine;
using Game;
using GameEntitySystem;

namespace SCIENEW {
    public class SqueezerDevice : FourDirectionalDevice, ICrafterDevice<ComponentSqueezer>, IElectricElementDevice {
        public SqueezerDevice() : base("SqueezerDevice", 105, upSlot: 236, sideSlot: 103, rotate: true) {

        }

        public string GetEntityName(int value) => "Squeezer";

        public Widget GetWidget(IInventory inventory, ComponentSqueezer component) => new SqueezerWidget(inventory, component);

        public override DeviceBehavior[] GetBehaviors(Project project) => [new SqueezerDeviceBehavior(project)];

        public ElectricElement CreateElectricElement(SubsystemElectricity subsystemElectricity, int value, int x, int y, int z) => new CrafterPopResultsElectricElement(subsystemElectricity, new Point3(x, y, z), GetDirection(value));

        public ElectricConnectorType? GetConnectorType(SubsystemTerrain terrain, int value, int face, int connectorFace, int x, int y, int z) => ElectricConnectorType.Input;

        public int GetConnectionMask(int value) => int.MaxValue;
    }
}